<?php
/**
 * 
 * @author szm
 *
 */

class Dialogue extends CI_Controller {
    
    public function index(){
        $lessonId= $_REQUEST['lesson_id']?$_REQUEST['lesson_id']:246;
        $this->load->model('Dialogue_model');
        $data=$this->Dialogue_model->getDialogues($lessonId);
        $this->load->view('dialogue/index',array('dialogs'=>$data));
    }
    public function getDialogues(){
        $data=array();
        $this->load->model('Dialogue_model');
        $data=$this->Dialogue_model->test();
        $this->load->view('dialogues',$data);
    }
    public function listAllDialogues(){
        $data=array();
        $this->load->model('Dialogue_model');
        $this->Dialog_model->listAllDialogues();
        $this->load->view('list_all_dialogues');
    }
    
    public function getDialogue(){
        $data=array();
        $this->load->view('dialogue');
    }
    
    public function saveDialogue(){
        $data=array();
        redirect('/lesson/index/', 'refresh');

    }
    
    public function removeDialogue(){
        $data=array();
        redirect('/lesson/index/', 'refresh');
    }
}

